package cn.kust.clock.pojo.vo;

import cn.kust.clock.pojo.entity.Travels;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @author bjs
 * @date 2022/7/27 0027  15:35
 **/
@Data
@NoArgsConstructor
public class TravelsVO {
    private Long id; //游记id

    private Long userId; //用户id，后期远程调用获取用户信息

    private String title;//游记标题

    private String cover;//游记封面

    private LocalDateTime gmtCreate;//游记创建时间

    private Integer likeNum; //点赞数

    public TravelsVO(Travels travels, Integer likeNum) {
        this.id = travels.getId();
        this.userId = travels.getUserId();
        this.title = travels.getTitle();
        this.cover = travels.getCover();
        this.gmtCreate = travels.getGmtCreate();
        this.likeNum = likeNum;
    }
}
